package com.huaxun.edu.web.jb;

import net.optix.common.app.AppContext;
import net.optix.common.app.BaseAction;
import net.optix.common.app.ExecuteResult;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.huaxun.edu.model.TBE_Circle;
import com.huaxun.edu.ucc.IJBUCC;

/*************************************************
 * @category 添加学校
 * @author 姜志光
 * 
 ************************************************/
@ParentPackage(value = "basic")
@Namespace(value = "/jb")
@Action(value = "addJB", results = { @Result(name = "success", type = "theme", location = "/resource/edu/jb/addJB.html") })
public class AddJBAction extends BaseAction {

	private TBE_Circle circle;

	private String xxdm;

	private String jb;

	public String execute() {

		return success;
	}

	public String doExecute() {

		IJBUCC jbUCC = AppContext.getService("jbUCC", IJBUCC.class);
		ExecuteResult result = jbUCC.addJB(xxdm, jb, circle);
		if (null != result) {
			setResult(new StringBuffer(result.message));
		} else {
			setResult(new StringBuffer("添加失败"));
		}
		return ajax;
	}

	public TBE_Circle getCircle() {
		return circle;
	}

	public void setCircle(TBE_Circle circle) {
		this.circle = circle;
	}

	public String getJb() {
		return jb;
	}

	public void setJb(String jb) {
		this.jb = jb;
	}

	public String getXxdm() {
		return xxdm;
	}

	public void setXxdm(String xxdm) {
		this.xxdm = xxdm;
	}

}